<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>测试Filter</title>
</head>
<body>
<script src="https://unpkg.com/@reactivex/rxjs@5.0.0-beta.7/dist/global/Rx.umd.js"></script>
<script>
	let source = Rx.Observable.range(0, 5)
	.filter( (x, idx, obs) => x % 2 === 0);
	
	let subscription = source.subscribe(
		x => console.log('Next: ' + x),
		err => console.log('Error: ' + err),
		() => console.log('Completed'));
	
</script>
</body>
</html>